package com.gitee.swsk33.catserviceconsumer.feignclient;

import com.gitee.swsk33.catentity.dataobject.Cat;
import com.gitee.swsk33.catentity.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "cat-provider", path = "/provider/cat", contextId = "cat-client")
public interface CatClient {

	@PostMapping("/add")
	Result add(@RequestBody Cat cat);

	@DeleteMapping("/delete/{id}")
	Result delete(@PathVariable("id") int id);

	@PutMapping("/update")
	Result update(@RequestBody Cat cat);

	@GetMapping("/get/{id}")
	Result<Cat> getCat(@PathVariable("id") int id);

}